import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-07-30
 * Time: 22:21
 */
public class test1 {
    public static void main(String[] args) {
        Map<Character,Integer> map = new HashMap<>();
        String t = "BACC";

        for (int i=0;i<t.length();i++){
            map.put(t.charAt(i),map.getOrDefault(t.charAt(i),0)+1);
        }
        System.out.println(map.size());
    }
}
